package com.common.service;

import com.common.entity.SupperEntity;
import com.common.model.SupperModel;
import com.common.mysql.SearchPageResult;
import com.common.mysql.Where;

import java.util.List;

    public interface BaseService<I, M extends SupperModel<I>, E extends SupperEntity<I>> {
    List<M> searchAll();

    M getById(I id);

    List<M> search(Where where);

    int update(M model);

    int add(M model);

    int delete(I id);

    M searchOne(Where where);

    SearchPageResult<M> searchPage(int page, int limit);

    int count(Where where);


}
